<div class="field-wrapper">
    <label *ngIf="!componentData.extends?.noLabelTxt" class="label" nz-tooltip
        [nzTooltipTitle]="(componentData && componentData.labelText) ? componentData.labelText : '项目编号生成'">
        {{(componentData && componentData.labelText) ? componentData.labelText : '项目编号生成'}}
    </label>
    <ng-container *ngIf="!componentData.disabled; else disabledTpl">
        <div class="field-control" [ngClass]="{'has-form-error': getComponentError(componentData.identifyId)}">
            <input type="text" nz-input class="content border-form-item" [ngModel]="bindData"
                [disabled]="componentData.readonly" (ngModelChange)="setBindData($event)" />
        </div>
        <span class="error-tip" *ngIf="getComponentError(componentData.identifyId)">
            <ng-container *ngTemplateOutlet="errorTpl"></ng-container>
        </span>
    </ng-container>
</div>
<ng-template #errorTpl>{{getErrorMsg(componentData.identifyId)}}</ng-template>

<ng-template #disabledTpl>
    <span>{{bindData}}</span>
    <i *ngIf="dataChangeLog" class="iconfont icon-file-list-2-line icon-data-change" nz-popover
            [nzPopoverContent]="contentTemplate"></i>
</ng-template>

<ng-template #contentTemplate>
    <div class="popover-content">
        <div>近期更正</div>
        <div>更正时间：{{dataChangeLog.time | date: 'yyyy年MM月dd日 HH:mm'}}</div>
        <div>更正内容：由“<span class="font-red">{{dataChangeLog.sourceValue}}</span>”更正为“<span
                class="font-bule">{{dataChangeLog.targetValue}}</span>”
        </div>
    </div>
</ng-template>